package com.tess.tboot.controller.manage;


import com.tess.tboot.base.TbootBaseController;
import com.tess.tboot.base.TbootBaseService;
import com.tess.tboot.entity.UserRole;
import com.tess.tboot.serviceimpl.UserRoleServiceImpl;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 拥有ROLE_ADMIN角色的用户可以访问
 * @author Exrickx
 */
@Slf4j
@RestController
@Api(description = "角色管理接口")
@RequestMapping("/userRole")
public class UserRoleController extends TbootBaseController<UserRole, String> {

    @Autowired
    private UserRoleServiceImpl userRoleService;

    /**
     * 获取service
     *
     * @return
     */
    @Override
    public TbootBaseService<UserRole> getService() {
        return userRoleService;
    }
}
